package com.lesso.zgs.sunflower.app.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.lesso.zgs.sunflower.domain.service.EmployeeDeviceDomainService;
import com.lesso.zgs.sunflower.pojo.dto.EmployeeDeviceDTO;
import com.lesso.zgs.sunflower.pojo.dto.EmployeeDeviceQueryDTO;
import com.lesso.zgs.sunflower.pojo.vo.EmployeeDeviceVO;
import com.lesso.zgs.sunflower.service.IEmployeeDeviceService;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.List;

/**
 * <p>
 * 员工设备关系 服务实现类
 * </p>
 *
 * @author zgs
 * @since 2025-07-03
 */
@DubboService
public class EmployeeDeviceServiceImpl implements IEmployeeDeviceService {

    private final EmployeeDeviceDomainService employeeDeviceDomainService;

    public EmployeeDeviceServiceImpl(EmployeeDeviceDomainService employeeDeviceDomainService) {
        this.employeeDeviceDomainService = employeeDeviceDomainService;
    }

    @Override
    public Integer authorizeDevice(EmployeeDeviceDTO dto) {
        return employeeDeviceDomainService.authorizeDevice(dto);
    }

    @Override
    public Integer cancelAuthorization(Long id) {
        return employeeDeviceDomainService.cancelAuthorization(id);
    }

    @Override
    public Page<EmployeeDeviceVO> page(EmployeeDeviceQueryDTO dto) {
        return employeeDeviceDomainService.page(dto);
    }

    @Override
    public List<EmployeeDeviceVO> getByEmployeeId(Long employeeId) {
        return employeeDeviceDomainService.getByEmployeeId(employeeId);
    }
} 